home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / utils / disk-man / linux-fl.000 / linux-fl / linux-floppies / building-blocks / SETblock_size < prev    next >
Encoding:
Text File  |  1996-04-04  |  700 b   |  28 lines

  1. #!/bin/sh
  2.   
  3. dialog \
  4. --title "SELECT BLOCK SIZE" \
  5. --menu "\n\
  6. Smaller block size means less wasted space   \n\
  7.                          (and longer file reads). \n\
  8. Larger  block size means more wasted space   \n\
  9.                              (and faster file reads). \n\
  10. Unix standard is to use 1024 bytes which is \n\
  11. a good compromise between space and performance." \
  12. 18 65 3 \
  13. "512"  "Better disk space utilization" \
  14. "1024" "Standard for Unix systems" \
  15. "2048" "Faster file access" \
  16. 2> /tmp/Fblock_size
  17.     
  18. BLOCK_SIZE="`cat /tmp/Fblock_size`"
  19. rm -f /tmp/Fblock_size
  20.  
  21. if [ ! "$BLOCK_SIZE" = "2048" -a ! "$BLOCK_SIZE" = "1024" ]; then
  22.    BLOCK_SIZE=512
  23. fi
  24.    
  25. echo "BLOCK_SIZE:  $BLOCK_SIZE bytes."
  26.  
  27.    
  28.